package com.atguigu.gulimall.web.filter;


import javax.servlet.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author nicc
 * @version 1.0
 * @className HelloFilter
 * @date 2022-10-14 11:34
 */
public class HelloFilter implements Filter {


    @Override
    public void doFilter(ServletRequest request,
                         ServletResponse response,
                         FilterChain chain) throws IOException, ServletException {
        //目标请求处理以前

        //请求放行
        chain.doFilter(request,response);

        HttpServletResponse resp = (HttpServletResponse) response;

        resp.sendRedirect("");

        //目标请求处理完成以后
    }
}
